package com.hzm.controller;

import com.alipay.api.AlipayApiException;
import com.hzm.service.AliPayService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @program: qy137-java
 * @description:
 * @author: 皇子明
 * @create: 2021-10-24 20:46
 **/
@RestController
@RequestMapping("/order/pay")
public class PayController {
    @Resource
    private AliPayService aliPayService;
    @ApiOperation("支付操作")
    @GetMapping("/allPay/{id}/{HuiYuanId}")
    public String allPay(@PathVariable("id") String id, @PathVariable("HuiYuanId") String HuiYuanId)throws AlipayApiException {
        String pay=aliPayService.allPay(id,HuiYuanId);
        return pay;
    }
}
